package API.Stream.Basic;

import java.util.ArrayList;

public class CollectionStream {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<String>();
        list.add("A");
        list.add("B");
        list.add("C");
        list.add("D");
        list.add("E");
        list.stream().filter(s -> s.length() == 1).
                forEach(s -> System.out.println(s));
    }
}
